import React, { useState } from "react";

export default function FuncCom() {
  const [num, setNum] = useState(0);

  return (
    <div>
      <div>函数组件</div>
      <div>
        <span>{num}</span>
        <button onClick={() => setNum(num + 1)}>+</button>
      </div>
    </div>
  );
}
